import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path:'/profile',
            component:()=>import("@/components/ProfileCard.vue")
        },
        {
            path: '/orderMarket',
            component: () => import("@/views/OrderMarketView.vue")
        },
      
        {   name:'orderDetail',
            path:'/orderSpecific',
            component:()=>import("@/views/OrderSpecific.vue")
        },
        {
            path: '/courierInfo',
            component:() => import("@/views/CourierInfo.vue")
        },
        
        {
            path: '/shipDetail/:orderId?',
            name: 'shipDetail',
            component: () => import("@/views/ShippingDetail.vue")

        },
        {
            path: '/ship',
            component: () => import("@/views/Ship.vue"),
            children: [
                { path: 'send/normal', component: () => import("@/views/Sending.vue") },
                { path: 'check', component: () => import("@/views/Check.vue") },
                { path: 'checkSpecific', component: () => import("@/views/CheckSpecific.vue") },
                { path: 'feedback',component: () => import("@/views/Feedback.vue")}
            ]
        },
        {
            path: '/home',
            component: () => import("@/views/Home.vue")
        },
        {
            path: '/order/historyOrder',
            component: () => import("@/views/HistoryOrders.vue")
        },

        {
            path: '/login',
            component: () => import("@/views/Login.vue")
        },
        {
            path: '/about',
            component: () => import("@/views/About.vue")
        },
        {
            path: '/news',
            component: () => import("@/views/News.vue")
        },
        {
            path: '/service',
            component: () => import("@/views/Service.vue")
        },
        {
            path: '/onlineOrder',
            component: () => import("@/views/OnlineOrder.vue")
        }
    ]
})

export default router